package com.shanzmoo.stm.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.stm.entity.StmSysMenuEntity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
 * 仓储用户系统菜单 更新对象
 *
 * @author Gzhao 2021-03-10
 */
@Data
@ApiModel("仓储用户系统菜单-更新对象")
public class StmSysMenuUpdateDTO extends StmSysMenuSaveDTO{

    private static final long serialVersionUID = 1L;

    @NotNull(message = "菜单Id不允许为空")
    @ApiModelProperty(value = "自增ID")
    private Integer menuId;

    @Override
    public StmSysMenuEntity convertEntity() {
        StmSysMenuEntity target = new StmSysMenuEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
